// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * SalesFlatInvoiceGrid generated by hbm2java
 */
@Entity
@Table(name = "sales_flat_invoice_grid", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = "increment_id"))
public class SalesFlatInvoiceGrid implements java.io.Serializable {

	private int entityId;
	private SalesFlatInvoice salesFlatInvoice;
	private CoreStore coreStore;
	private BigDecimal baseGrandTotal;
	private BigDecimal grandTotal;
	private int orderId;
	private Integer state;
	private String storeCurrencyCode;
	private String orderCurrencyCode;
	private String baseCurrencyCode;
	private String globalCurrencyCode;
	private String incrementId;
	private String orderIncrementId;
	private Date createdAt;
	private Date orderCreatedAt;
	private String billingName;

	public SalesFlatInvoiceGrid() {
	}

	public SalesFlatInvoiceGrid(SalesFlatInvoice salesFlatInvoice, int orderId) {
		this.salesFlatInvoice = salesFlatInvoice;
		this.orderId = orderId;
	}

	public SalesFlatInvoiceGrid(SalesFlatInvoice salesFlatInvoice,
			CoreStore coreStore, BigDecimal baseGrandTotal,
			BigDecimal grandTotal, int orderId, Integer state,
			String storeCurrencyCode, String orderCurrencyCode,
			String baseCurrencyCode, String globalCurrencyCode,
			String incrementId, String orderIncrementId, Date createdAt,
			Date orderCreatedAt, String billingName) {
		this.salesFlatInvoice = salesFlatInvoice;
		this.coreStore = coreStore;
		this.baseGrandTotal = baseGrandTotal;
		this.grandTotal = grandTotal;
		this.orderId = orderId;
		this.state = state;
		this.storeCurrencyCode = storeCurrencyCode;
		this.orderCurrencyCode = orderCurrencyCode;
		this.baseCurrencyCode = baseCurrencyCode;
		this.globalCurrencyCode = globalCurrencyCode;
		this.incrementId = incrementId;
		this.orderIncrementId = orderIncrementId;
		this.createdAt = createdAt;
		this.orderCreatedAt = orderCreatedAt;
		this.billingName = billingName;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "salesFlatInvoice"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "entity_id", unique = true, nullable = false)
	public int getEntityId() {
		return this.entityId;
	}

	public void setEntityId(int entityId) {
		this.entityId = entityId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public SalesFlatInvoice getSalesFlatInvoice() {
		return this.salesFlatInvoice;
	}

	public void setSalesFlatInvoice(SalesFlatInvoice salesFlatInvoice) {
		this.salesFlatInvoice = salesFlatInvoice;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "base_grand_total", precision = 12, scale = 4)
	public BigDecimal getBaseGrandTotal() {
		return this.baseGrandTotal;
	}

	public void setBaseGrandTotal(BigDecimal baseGrandTotal) {
		this.baseGrandTotal = baseGrandTotal;
	}

	@Column(name = "grand_total", precision = 12, scale = 4)
	public BigDecimal getGrandTotal() {
		return this.grandTotal;
	}

	public void setGrandTotal(BigDecimal grandTotal) {
		this.grandTotal = grandTotal;
	}

	@Column(name = "order_id", nullable = false)
	public int getOrderId() {
		return this.orderId;
	}

	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "store_currency_code", length = 3)
	public String getStoreCurrencyCode() {
		return this.storeCurrencyCode;
	}

	public void setStoreCurrencyCode(String storeCurrencyCode) {
		this.storeCurrencyCode = storeCurrencyCode;
	}

	@Column(name = "order_currency_code", length = 3)
	public String getOrderCurrencyCode() {
		return this.orderCurrencyCode;
	}

	public void setOrderCurrencyCode(String orderCurrencyCode) {
		this.orderCurrencyCode = orderCurrencyCode;
	}

	@Column(name = "base_currency_code", length = 3)
	public String getBaseCurrencyCode() {
		return this.baseCurrencyCode;
	}

	public void setBaseCurrencyCode(String baseCurrencyCode) {
		this.baseCurrencyCode = baseCurrencyCode;
	}

	@Column(name = "global_currency_code", length = 3)
	public String getGlobalCurrencyCode() {
		return this.globalCurrencyCode;
	}

	public void setGlobalCurrencyCode(String globalCurrencyCode) {
		this.globalCurrencyCode = globalCurrencyCode;
	}

	@Column(name = "increment_id", unique = true, length = 50)
	public String getIncrementId() {
		return this.incrementId;
	}

	public void setIncrementId(String incrementId) {
		this.incrementId = incrementId;
	}

	@Column(name = "order_increment_id", length = 50)
	public String getOrderIncrementId() {
		return this.orderIncrementId;
	}

	public void setOrderIncrementId(String orderIncrementId) {
		this.orderIncrementId = orderIncrementId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "order_created_at", length = 19)
	public Date getOrderCreatedAt() {
		return this.orderCreatedAt;
	}

	public void setOrderCreatedAt(Date orderCreatedAt) {
		this.orderCreatedAt = orderCreatedAt;
	}

	@Column(name = "billing_name")
	public String getBillingName() {
		return this.billingName;
	}

	public void setBillingName(String billingName) {
		this.billingName = billingName;
	}

}
